class Solution
{
public:
    int calculateDepth(TreeNode* root)
    {
        if (root == nullptr)
            return 0;
        return max(calculateDepth(root->left), calculateDepth(root->right)) + 1;
    }
};